﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Announcement/Announcement.master" AutoEventWireup="true" CodeBehind="AnnouncementList.aspx.cs" Inherits="HRdex_Final.Announcement.WebForm1" %>
<asp:Content ID="AnnouncementList" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="gvAnnouncement" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="#" DataSourceID="dstAnnouncementList">
    <Columns>
        <asp:BoundField DataField="#" HeaderText="#" InsertVisible="False" 
            ReadOnly="True" SortExpression="#" />
        <asp:BoundField DataField="Subject" HeaderText="Subject" 
            SortExpression="Subject" />
        <asp:BoundField DataField="Published" HeaderText="Published" 
            SortExpression="Published" />
        <asp:BoundField DataField="Category" HeaderText="Category" 
            SortExpression="Category" />
    </Columns>
</asp:GridView>

<asp:SqlDataSource ID="dstAnnouncementList" runat="server" 
    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
    SelectCommand="SELECT formAnnouncement.AnnouncementID AS [#], formAnnouncement.Subject, formAnnouncement.DateTime AS Published, catAnnouncement.CatName AS Category FROM catAnnouncement INNER JOIN formAnnouncement ON catAnnouncement.CatAnnID = formAnnouncement.CatAnnID">
</asp:SqlDataSource>

</asp:Content>
